<?php


namespace Plugin\PaypalSiteB\Controllers;

use Beike\Admin\Http\Controllers\Controller;
use Beike\Repositories\SettingRepo;
use Illuminate\Http\Request;

class AdminPollingPaypalController extends Controller
{
    /**
     * @throws \Throwable
     */
    public function saveSetting(Request $request)
    {
        SettingRepo::storeValue('setting', [
            'polling_paypal'       => $request->polling_paypal,
            'site_a_domain'        => $request->site_a_domain,
            'token'                => $request->token,
            'remaining_product_id' => $request->remaining_product_id
        ], 'paypal_site_b', 'plugin');

        return json_success('保存成功');
    }
}
